<template>
  <button @click="count++">{{ count }}</button>

  <div class="top">
    <RouterView />
  </div>

  <div class="bottom">
    <RouterLink custom activeClass="active" to="/films" v-slot="{ navigate }">
      <button @click="navigate">电影</button>
    </RouterLink>
    <RouterLink tag="button" activeClass="active" to="/cinemas">影院</RouterLink>
    <RouterLink tag="button" activeClass="active" to="/center">我的</RouterLink>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: 1
    }
  }

  // computed: {
  //   showBottom() {
  //     // 判断 this.$route 的 name
  //     console.log('this.$route', this.$route)
  //     return this.$route.name !== 'film'
  //   }
  // }
}
</script>

<style>
* {
  margin: 0;
  padding: 0;
}

html,
body,
#app {
  height: 100%;
}

#app {
  display: flex;
  flex-direction: column;
}

.top {
  flex: 1;
  /* background-color: green; */
  /* overflow-y: auto; */
  overflow: hidden;
}

.bottom {
  display: flex;
  align-items: center;
  height: 50px;
  background-color: pink;
}

.bottom a {
  flex: 1;
  text-align: center;
}

.active {
  color: red;
}
</style>
